<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Component-props</title>
    <script src="../assets/js/vue.js"></script>
</head>
<body>
    <h1>Component-props</h1>
    <hr>
    <div id="app">
        <!-- <lifeng from-here="China"></lifeng> -->
        <!-- 在构造器中向组件中传值使用v-bind-->
        <lifeng v-bind:here="message"></lifeng>
    </div>
</body>
<script>
    var app = new Vue({
        el:"#app",
        data:{ 
            message:"驻马店"
        },
        components: {
            "lifeng":{
                template:`
                    <h1 style="color:red">lifeng form {{here}}</h1>
                `,
                props:['here']
            }
        }
    })
</script>
</html>